package com.anc.admin.model.admin.outServiceImpl;



import api.model.UserDeleteDTO;
import api.remote.SysUserOuterService;
import com.anc.admin.model.admin.entity.SysUser;
import com.anc.admin.model.admin.service.ISysUserService;
import com.anc.web.annotions.RemoteService;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import org.springframework.beans.factory.annotation.Autowired;


/**
 * @author: Anc
 */
@RemoteService
public class SysUserOuterServiceImpl implements SysUserOuterService {

    @Autowired
    private ISysUserService iSysUserService;
    @Override
    public boolean updateUser(UserDeleteDTO userDeleteDTO) {
        LambdaUpdateWrapper<SysUser> wrapper = new LambdaUpdateWrapper<>();
        wrapper.set(SysUser::getDelFlag,4);
        wrapper.eq(SysUser::getId,userDeleteDTO.getUserId());
//        int a=1/0;
        return iSysUserService.update(wrapper);
    }
}
